from typing import Optional

from beanie import Document


class Permission(Document):
    name: Optional[str] = None
    path: str
    method: str

    class Config:
        schema_extra = {
            "example": {
                "name": "权限名称",
                "path": "权限路径",
                "method": "操作方法"
            }
        }
